package com.bifang.module.file.dao.model;

import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * 文件服务日志表
 *
 * @author chenzh
 * @since 2021-01-27
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("FILE_LOG_HISTORY")
@Schema(title ="FileLogHistory对象", description = "文件服务日志表")
public class FileLogHistory extends Model<FileLogHistory> {

    private static final long serialVersionUID = 1L;

    @Schema(title = "文件日志id")
    @TableId(value = "FILE_LOG_ID", type = IdType.INPUT)
    private BigDecimal fileLogId;

    @Schema(title = "文件分类")
    @TableField("FILE_CLASS_CODE")
    private String fileClassCode;

    @Schema(title = "文件请求类型 upload 上传 download 下载 ")
    @TableField("FILE_REQ_TYPE")
    private String fileReqType;

    @Schema(title = "文件名称")
    @TableField("FILE_NAME")
    private String fileName;

    @Schema(title = "请求应用id")
    @TableField("APP_ID")
    private Long appId;

    @Schema(title = "请求人")
    @TableField("NAME")
    private String name;

    @Schema(title = "请求人id")
    @TableField("USER_ID")
    private String userId;

    @Schema(title = "请求时间")
    @TableField("REQ_TIME")
    private Date reqTime;

    @Schema(title = "应用编号")
    @TableField("CLIENT_ID")
    private String clientId;

    @Schema(title = "应用名称")
    @TableField("APP_NAME")
    private String appName;

    @Schema(title = "文件id")
    @TableField("FILE_ID")
    private BigDecimal fileId;

    @Schema(title = "请求ip")
    @TableField("REQ_IP")
    private String reqIp;

    @Schema(title = "成功标志")
    @TableField("CODE")
    private Integer code;

    @Schema(title = "错误原因")
    @TableField("MESSAGE")
    private String message;

    @Schema(title = "公司id")
    @TableField("ORG_ID")
    private String orgId;

    @Schema(title = "开始时间")
    @TableField("BEG_TIME")
    private Date begTime;

    @Schema(title = "结束时间")
    @TableField("END_TIME")
    private Date endTime;

    @Schema(title = "耗时 秒")
    @TableField("TAKING_TIME")
    private BigDecimal takingTime;

    @Schema(title = "年月")
    @TableField("YM")
    private Integer ym;

    @Override
    public Serializable pkVal() {
        return this.fileLogId;
    }
}
